package com.jd.xc.jmeter;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.jmeter.config.Argument;
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.protocol.java.sampler.JavaSamplerClient;
import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
import org.apache.jmeter.samplers.SampleResult;
public class QlBlockerTest implements JavaSamplerClient {
    private Integer state;
    private String suggest;
    public void setupTest(JavaSamplerContext javaSamplerContext){ }

    public SampleResult runTest(JavaSamplerContext javaSamplerContext) {
        SampleResult sampleResult = new SampleResult();
        sampleResult.setSampleLabel("userName");
        state = javaSamplerContext.getIntParameter("user");
        suggest = javaSamplerContext.getParameter("userCode");
        sampleResult.sampleStart();
       

        sampleResult.setDataType(SampleResult.TEXT);
        sampleResult.setResponseMessageOK();
        sampleResult.setResponseCodeOK();
        sampleResult.sampleEnd();
        sampleResult.setSuccessful(Boolean.TRUE);
      
        return sampleResult;
    }
    public void teardownTest(JavaSamplerContext javaSamplerContext) {
    }
    public Arguments getDefaultParameters() {
        Arguments params = new Arguments();
        params.addArgument("state","4");
        params.addArgument("suggest","pass");
        params.addArgument("suggest_operate","passOk");
        return params;
    }
}